import request from '@/utils/request'
// 获取部门列表
export function Getdepartment() {
  return request({
    method: 'GET',
    url: '/company/department'
  })
}

// 删除部门
export function delDepartment(id) {
  return request({
    method: 'DELETE',
    url: `/company/department/${id}`
  })
}

// 新增部门
export function addDepartment(data) {
  return request({
    method: 'POST',
    url: '/company/department',
    data
  })
}
// 根据ID查询部门详情
export function getDepartmentDetail(id) {
  return request({
    method: 'GET',
    url: `/company/department/${id}`
  })
}
// 根据ID修改部门详情
export function editDepartment(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
